1. Technical Field
The present invention relates to traffic control in a data communication system and more particularly, relates to a traffic shaper for controlling traffic bandwidth usage in an IP (Internet Protocol) network to guarantee proper QoS (Quality of Service) for different types of real-time traffic applications such as interactive audio and/or video while concomitantly providing keep-alive bandwidth for best-effort traffic.
2. Related Art
In recent years, increased usage of the Internet has resulted in scarcity of network capacity, and compromised performance of traditional applications. At the same time, new applications such as interactive audio and/or video, including video-conferencing or Voice over IP (VoIP) have emerged which demand much improved QoS (Quality of Service). As a result, network service providers (both enterprise and traditional ISPs) are pressured to provide different customers alternative levels of service.
One of the most promising of these services is Differentiated Services (DiffServ), which provides for classification of different flows of IP data packets and prioritizing scheduling of these IP flows in routers. These schemes work best when traffic bandwidth of individual end users is bounded and contains as small fluctuations as possible. The boundedness property of IP data packets can be achieved by using traffic shaping, or limiting the traffic bandwidth to an agreed-upon number of IP data packets per time unit and discarding excess traffic.
Several traffic shaping techniques may be provided to shape the traffic so that the traffic does not exceed a predetermined transmission rate for each destination in an IP network. Existing IP traffic shapers are designed to limit bandwidth usage of TCP (Transfer Control Protocol) traffic. Subsequently, those traffic shapers are not suitable for special requirements of high-priority, interactive real-time traffic with small packet size, such as video-conferencing or Voice over IP (VoIP). At the same time, it is desirable to prevent TCP connections from being exhausted of bandwidth. Accordingly, there is a need for an advanced traffic shaper advantageously configured for priority forwarding of real-time traffic while providing keep-alive bandwidth for xe2x80x9cbest-effortxe2x80x9d traffic at the same time. Also needed is an advanced traffic shaper used together with QoS (Quality of Service) core network technology, such as an ATM network.
Accordingly, various embodiments of the present invention are directed to an advanced traffic shaper for shaping real-time traffic in an IP-based network while simultaneously providing keep-alive bandwidth for best-effort traffic. Such a traffic shaper may be an algorithm integrated into existing operating system (OS) of a host processor and/or a computer readable medium for use in a host processor for priority forwarding for real-time traffic and avoiding correlated loss for real-time streams while providing keep-alive bandwidth for best-effort traffic. In addition, the traffic shaper may be installed in the host processor of a source terminal or a destination terminal in an IP-based network which uses a bandwidth-limited IP link for providing connection between the source terminal and the destination terminal.
In accordance with the present invention, the traffic shaper may comprise a packet classifier coupled to receive an incoming packet from the network and to classify the incoming packet as one of a real-time packet and a best-effort packet; a packet discarding block coupled to perform traffic shaping of the incoming packet from the packet classifier and discard the incoming packet in accordance with traffic shaping parameters; connection queues coupled to temporary store real-time packets and best-effort packets from the packet discarding block, respectively; and a packet scheduling block coupled to send the real-time and best-effort packets from the connection queues to an outgoing device in accordance with the traffic shaping parameters.
The connection queues may include a real-time queue for storing the real-time packets and a best-effort queue for storing the best-effort packets. Both real-time and best-effort queues correspond to packet buffers constructed from first-in-first-out (FIFO) memory for storing real-time packets and best-effort packets, respectively.
The packet discarding block may be executed to discard an incoming packet by steps of: determining whether the real-time and best-effort queues are empty; when the real-time and best-effort queues are empty, resetting internal counters and a scheduled transmission time of the next incoming packet; determining whether a real-time latency is greater than a maximum latency value of the real-time queue; when the real-time latency is greater than the maximum latency value of the real-time queue, discarding the real-time packet input from the packet classifier; determining whether a total latency is greater than a maximum latency value of both the real-time and best-effort queues; when the total latency is greater than the maximum latency value of both the real-time and best-effort queues, adding a best-effort packet to a tail of the best-effort queue and discarding a best-effort packet from a head of the best-effort queue; determining whether a length of the real-time queue is greater than a maximum queue length of the real-time queue; when the length of the real-time queue is greater than a maximum queue length of the real-time queue, discarding the real-time packet input from the packet classifier; determining whether a length of the best-effort queue is greater than a maximum queue length of the best-effort queue; when the length of the best-effort queue is greater than a maximum queue length of the best-effort queue, adding a best-effort packet input from the packet classifier to the tail of the best-effort queue and discarding a best-effort packet from a head of the best-effort queue; determining whether there is concurrency and time to discard a real-time packet to make room for best-effort packets; when there is concurrency and time to discard the real-time packet, discarding the real-time packet to implement the keep-alive bandwidth for best-effort packets; and placing the real-time packet that was not discarded in the real-time queue.
The packet scheduling block may be periodically executed to schedule output of an incoming packet by the steps of: determining whether both the real-time and best-effort queues are empty; determining whether there is concurrency and time to transmit the best-effort packet from the best-effort queue; when there is concurrency and time to transmit the best-effort packet, checking whether total bandwidth constraint allows transmission of the best-effort packet from the best-effort queue head; when transmission is allowed, updating a time of next transmission and transmitting the best-effort packet to the outgoing device; determining whether the real-time queue is not empty and time for transmission of the real-time packet is permitted; when the real-time queue is not empty and time for transmission of the real-time packet is permitted, updating the transmission time and transmitting the real-time packet to the outgoing device from the real-time queue head; determining whether the best-effort queue is not empty and time for transmission of the best-effort packet is permitted; and when the best-effort queue is not empty and time for transmission of the best-effort packet is permitted, updating the transmission time and transmitting the best-effort packet to the outgoing device from the best-effort queue head.
The present invention is more specifically described in the following paragraphs by reference to the drawings attached only by way of example.